from general import *
def mainpage(content):
	return """
	<!DOCTYPE html>
	<html>
	"""+header+"""
	<body>
	"""+more+daohangQwQ+"""
	<div class="container">
		<div style="height: 60px;"></div>
		<div class="row" >
			<div class="col-md-8">

				<div class="panel panel-default card" id="main">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-gamepad"></i>&emsp;有趣的项目</h3>
                    </div>
	                """+content+"""
				</div>
			</div>
			<div class="col-md-3">

					"""+my+ friend+"""
			</div>
		</div>
	 </div>
	</body>
	</html>
	"""
def page(content):
	return """
	<!DOCTYPE html>
	<html>
	"""+header+"""
	<body>
	"""+more+daohangQwQ+"""
	<div class="container">
		<div style="height: 60px;"></div>
		<div class="row" >
			<div class="col-md-8">

				
                    """+content+"""
			</div>
			<div class="col-md-3">

					"""+my+ friend+"""
			</div>
		</div>
	 </div>
	</body>
	</html>
	"""
content="""<table class="table"><tbody><tr><th style="width: 80%;">标题</th></tr>\n"""
content=content+"<tr><td><a href='/games/generator.html'>【转载】狗屁不通文章生成器</td></tr>\n"
content=content+"<tr><td><a href='/games/iframe.html'>嵌套！！！</td></tr>\n"
content=content+"<tr><td><a href='/games/2048.html'>【转载】2048</td></tr>\n"
content=content+"<tr><td><a href='/games/watermelon.html'>【转载】合成大西瓜</td></tr>\n"
content=content+"<tr><td><a href='/games/mosiyuan.html'>【转载】$\mathbb{MOSIYUAN}$</td></tr>\n"
content=content+"</tbody></table>"
write("games\\index.html",mainpage(content).replace('<li><a href="/games/">','<li class="active"><a href="/games/">'))
write("games\\generator.html",page("""
  <div class="panel panel-default card" id="main">
  <div id="主体">
  <div id="标题">文章生成器</div>
  	<div id="主题">
          <span>主题</span>
          <input id="theme">
          <span>名字</span>
          <input id="name">
          <span>格式</span>
          <input id="Style">
          <button onclick="生成文章()">生成</button>
        </div>
        <div id="文章"></div>
      </div>
      <div id="声明">
        <del id="声明文字">请将生成的文章用于正规用途</del>
      </div>


  <script src="main.js"></script>
  <style>
  .Jiyu {
      color: red;
  }
  .Jiyu {
      display: inline-block;
      font-weight: 700;
      font-size: .9em;
      font-weight: 700;
      padding-inline-start: 2px;
      padding-inline-end: 2px;
      font-family: "Helvetica Neue",Helvetica,Arial,sans-serif,;
  }
  .Jiyu:first-letter {
      color: #000!important;
  }
    @media screen and (max-width: 1024px) {
      #主体{
        border: 2px solid #333333;
        margin: 6px;
        padding: 6px;
        background: #f8f8f8;
      }
      #标题{
        font-size: 3rem;
        line-height: 3rem;
        text-align: center;
      }
      #主题{
        text-align: center;
        margin-top: 6px;
        font-size: 0px;
      }
      #主题 span{
        font-size: 2rem;
        vertical-align: baseline;
        margin-left: 6px;
      }
      #主题 input{
        border: none;
        border-bottom: #666666 2px solid;
        padding: 1px 0 0 0;
        margin: 0px 6px 0 6px;
        vertical-align: baseline;
        font-size: 2rem;
        background: #f8f8f8;
        color: #333333;
        text-align: center;
        min-width: 20%;
      }
      #主题 button{
        border: 0;
        padding: 3px 7px 3px 7px;
        margin: 0;
        vertical-align: top;
        font-size: 1.4rem;
        background: #454545;
        color: #efefef;
      }
      #文章 div{
        margin-top: 6px;
        font-size: 2rem;
        text-align: justify;
      }
      #声明{
        margin: 0 0 0 6px;
      }
      #声明 p{
        margin: 0 0 3px 3px;
        font-size: 1.4rem;
      }
      #声明文字{
        display: none;
      }
      #页脚{
        margin: 6px;
      }
      #页脚 p{
        margin: 3px;
        font-size: 1.4rem;
        text-align: right;
      }
      .链接{
        color: #666666;
      }
      .图标{
        height: 1rem;
        width: 1rem;
        vertical-align: top;
        margin-top: 2px;
      }
    }

    @media screen and (min-width: 1024px) {
      #主体{
        border: 2px solid #333333;
        margin: 20px;
        padding: 20px;
        background: #f8f8f8;
      }
      #标题{
        font-size: 1.9rem;
        line-height: 1.9rem;
        text-align: center;
      }
      #主题{
        text-align: center;
        margin-top: 20px;
        font-size: 0px;
      }
      #主题 span{
        font-size: 1rem;
        vertical-align: baseline;
        margin-left: 20px;
      }
      #主题 input{
        border: none;
        border-bottom: #666666 2px solid;
        padding: 1px 0 0 0;
        margin: 0px 20px 0 20px;
        vertical-align: baseline;
        font-size: 1rem;
        background: #f8f8f8;
        color: #333333;
        text-align: center;
        min-width: 20%;
      }
      #主题 button{
        border: 0;
        padding: 5px 15px 5px 15px;
        margin: 0;
        vertical-align: top;
        font-size: 0.75rem;
        background: #454545;
        color: #efefef;
      }
      #文章 div{
        margin-top: 20px;
        text-align: justify;
      }
      #声明{
        margin: 0 0 0 20px;
      }
      #声明 p{
        margin: 0 0 5px 5px;
        font-size: 0.75rem;
      }
      #声明文字{
        display: none;
      }
      #页脚{
        margin: 20px;
      }
      #页脚 p{
        margin: 5px;
        font-size: 0.75rem;
        text-align: right;
      }
      .链接{
        color: #666666;
      }
      #页脚 span{
        padding: 2px 0 0 0;
        vertical-align: baseline;
      }
      .图标{
        height: 0.7rem;
        width: 0.7rem;
        vertical-align: top;
        margin-top: 4px;
      }
    }
    .金钩{
  	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%23f1c40f' style='margin-bottom: -3px;'%3E%3Cpath d='M16 8C16 6.84375 15.25 5.84375 14.1875 5.4375C14.6562 4.4375 14.4688 3.1875 13.6562 2.34375C12.8125 1.53125 11.5625 1.34375 10.5625 1.8125C10.1562 0.75 9.15625 0 8 0C6.8125 0 5.8125 0.75 5.40625 1.8125C4.40625 1.34375 3.15625 1.53125 2.34375 2.34375C1.5 3.1875 1.3125 4.4375 1.78125 5.4375C0.71875 5.84375 0 6.84375 0 8C0 9.1875 0.71875 10.1875 1.78125 10.5938C1.3125 11.5938 1.5 12.8438 2.34375 13.6562C3.15625 14.5 4.40625 14.6875 5.40625 14.2188C5.8125 15.2812 6.8125 16 8 16C9.15625 16 10.1562 15.2812 10.5625 14.2188C11.5938 14.6875 12.8125 14.5 13.6562 13.6562C14.4688 12.8438 14.6562 11.5938 14.1875 10.5938C15.25 10.1875 16 9.1875 16 8ZM11.4688 6.625L7.375 10.6875C7.21875 10.8438 7 10.8125 6.875 10.6875L4.5 8.3125C4.375 8.1875 4.375 7.96875 4.5 7.8125L5.3125 7C5.46875 6.875 5.6875 6.875 5.8125 7.03125L7.125 8.34375L10.1562 5.34375C10.3125 5.1875 10.5312 5.1875 10.6562 5.34375L11.4688 6.15625C11.5938 6.28125 11.5938 6.5 11.4688 6.625Z'%3E%3C/path%3E%3C/svg%3E ");
      background-size: cover;
      display:inline-block;
   	 width: 18px;
      height: 18px;
      margin-left: 2px;
   }
  .pn{
  	color: #8e44ad;
     font-weight:bold;
  }
  </style>
				</div>""").replace('<li><a href="/games/">','<li class="active"><a href="/games/">'))

write("games\\iframe.html",page("""
  <iframe class="panel panel-default card" id="main" style="height:500px;width: 100%;padding: 10px;" src="/">
				</iframe>
""").replace('<li><a href="/games/">','<li class="active"><a href="/games/">'))

write("games\\2048.html",page("""
  <iframe class="panel panel-default card" id="main" style="height: 1006px;width: 100%;padding: 10px;background-color: rgba(252, 252, 252, 0.78);" src="2048/" scrolling="no">
				</iframe>
""").replace('<li><a href="/games/">','<li class="active"><a href="/games/">'))

write("games\\watermelon.html",page("""
  <iframe class="panel panel-default card" id="main" style="height: 806px;width: 100%;padding:10px;padding-left: 20%;padding-right:20%;background-color: rgba(252, 252, 252, 0.78);" src="http://www.wesane.com/game/654/" scrolling="no">
				</iframe>
""").replace('<li><a href="/games/">','<li class="active"><a href="/games/">'))

write("games\\mosiyuan.html",page("""
  <iframe class="panel panel-default card" id="main" style="height: 2006px;width: 100%;padding: 10px;background-color: rgba(252, 252, 252, 0.78);" src="https://lmoliver.github.io/mosiyuan/index.html" scrolling="no">
				</iframe>
""").replace('<li><a href="/games/">','<li class="active"><a href="/games/">'))
